#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<bitset>
#include<vector>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#define rep(i,a,b) for(register int i = (a);i <= (b);++i)
#define per(i,a,b) for(register int i = (a);i >= (b);--i)  
typedef long long ll;
typedef unsigned long long ull;
using std::string;using std::cin;using std::cout;

int _,n,a[110],p,now;
char ch;

int main(){
    std::ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    //freopen("in.in", "r", stdin);
    cin >> _;
    while(_--){
        cin >> n;
        rep(i,1,2*n-1){
            cin >> ch;
            a[i] = ch - '0';
        }
        p = 2 , now = 1;
        rep(i,1,n){
            cout << a[now];
            now += 2;
        }
        cout << "\n";
    }
    return 0;
}